package com.lgc.javathread.demo.atomicIntegerDemo;

import java.util.concurrent.atomic.AtomicInteger;

public class MyThread implements Runnable {

    AtomicInteger ai = new AtomicInteger();

    public AtomicInteger getAtomicInteger(){
        return ai;
    }

    @Override
    public void run() {
        for (int i=0;i<10000;i++){
            ai.getAndIncrement();
        }
    }
}
